<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">
        </script>
        <script>
            function jq_okback(result,status,xhr){
                console.log('jq_okback:',result);
            }
            function ftest(){
                console.log('ftest:');
                let url="https://ctest1.hfcapp.com/dsopm/v1/read_xprize";
                let contentType = "application/json;utf-8";
                let senddata = {activityId:"2022112201"};
                let param = {
                    //async: true,
                    contentType: contentType,
                    data: JSON.stringify(senddata),
                    dataType: "json",
                    //processData: false,
                    success:jq_okback,
                    type: "POST",
                    url: url
                };
                if ($){
                    console.log('param:',param);
                    $.ajax(param);
                }else{
                   console.log('$ is undefined.'); 
                }
                
            }
        </script>
        
    </head>
    <body>
        <div style="height:32px; width:100%">
            <input type="button" value="测试jQuery的ajax" onclick="ftest()"/>
        </div>
    </body>
</html>